/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86186
 * Date: 2023-08-24
 * Time: 22:23
 */
public class Test {
    public int findMin(int[] nums) {
        int n = nums.length;
        int left = 0;
        int right = n - 1;
        while(left < right) {
            int mid = left + (right - left) / 2;
            if(nums[mid] > nums[n-1]) {
                left = mid + 1;
            }else {
                right = mid;
            }
        }

        return nums[left];
    }
}
